package com.wfh.easychat.service;

import com.wfh.easychat.model.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wfh.easychat.model.vo.UserInfoVo;
import jakarta.servlet.http.HttpServletRequest;

import java.util.Map;

/**
* @author fenghuanwang
* @description 针对表【user_info(用户信息)】的数据库操作Service
* @createDate 2025-09-24 14:28:31
*/
public interface UserInfoService extends IService<UserInfo> {

    /**
     * 获取当前登录用户
     *
     * @param request
     * @return
     */
    UserInfo getLoginUser(HttpServletRequest request);

    /**
     * 用户注册
     *
     * @param email
     * @param passwrod
     * @param nickName
     * @return
     */
    UserInfoVo userregister(String email, String passwrod, String nickName);

    /**
     * 用户登录
     * @param email
     * @param passwrod
     * @param request
     * @return
     */
    Map<Object, Object> login(String email, String passwrod, HttpServletRequest request);

    /**
     * 管理员登录
     * @param email
     * @param password
     * @param request
     * @return
     */
    UserInfo adminLogin(String email, String password, HttpServletRequest request);
}
